package com.t309.tzy.controller;

import com.t309.tzy.common.TSysUserConverter;
import com.t309.tzy.entity.TSysUser;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/formatter")
public class FormatterController {
    @ResponseBody
    @GetMapping("/user")
    public String formatter(@RequestParam("user") TSysUser user, Model model){
        System.out.println("user.realName="+user.getRealName());
        //user.setRealName("法外狂徒张三");
        //user.setAccount("zhs");
        //return TSysUserController;
        TSysUserConverter converter = new TSysUserConverter();
        //converter.convert(user);
        return user.toString();
    }


}
